<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %><%@taglib uri="http://www.icesoft.com/icefaces/component" prefix="ice" %>
<%@taglib uri="http://www.icesoft.com/icefaces/component" prefix="ice" %>
<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <title>Listing Users Items</title>
            <link rel="stylesheet" type="text/css" href="/WebIDE-war/faces/jsfcrud.css" />
        </head>
        <body>
            <div style="left: 0px; top: 0px; position: absolute">
                <jsp:directive.include file="../MasterPages/Header.jspf"/>
            </div>
            <div style="left: 0px; top: 96px; position: absolute">
                <jsp:directive.include file="../MasterPages/Navigator.jspf"/>
            </div><div style="left: 0px; top: 504px; position: absolute">
                <jsp:directive.include file="../MasterPages/footer.jspf"/>
            </div>
            <ice:panelGroup id="messagePanel" layout="block">
                <ice:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </ice:panelGroup>
            <h1>Listing Users Items</h1>
            <ice:form styleClass="jsfcrud_list_form">
                <ice:outputText escape="false" value="(No Users Items Found)" rendered="#{users.pagingInfo.itemCount == 0}" />
                <ice:panelGroup rendered="#{users.pagingInfo.itemCount > 0}">
                    <ice:outputText value="Item #{users.pagingInfo.firstItem + 1}..#{users.pagingInfo.lastItem} of #{users.pagingInfo.itemCount}"/>
                    <ice:commandLink action="#{users.prev}" value="Previous #{users.pagingInfo.batchSize}" rendered="#{users.pagingInfo.firstItem >= users.pagingInfo.batchSize}"/>
                    <ice:commandLink action="#{users.next}" value="Next #{users.pagingInfo.batchSize}" rendered="#{users.pagingInfo.itemCount >= users.pagingInfo.lastItem + users.pagingInfo.batchSize}"/>
                    <ice:commandLink action="#{users.next}" value="Remaining #{users.pagingInfo.itemCount - users.pagingInfo.lastItem}"
                                     rendered="true"/>
                    <ice:dataTable value="#{users.usersItems}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
                        <ice:column>
                            <f:facet name="header">
                                <ice:outputText value="UserName"/>
                            </f:facet>
                            <ice:outputText value=" #{item.userName}"/>
                        </ice:column>
                        <ice:column>
                            <f:facet name="header">
                                <ice:outputText value="Password"/>
                            </f:facet>
                            <ice:outputText value=" #{item.password}"/>
                        </ice:column>
                        <ice:column>
                            <f:facet name="header">
                                <ice:outputText escape="false" value="---"/>
                            </f:facet>
                            <ice:commandLink value="Show" action="#{users.detailSetup}">
                                <f:param name="jsfcrud.currentUsers" value="#{jsfcrud_class['webidewar.jsf.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][item][users.converter].jsfcrud_invoke}"/>
                            </ice:commandLink>
                            <ice:outputText value=" "/>
                            <ice:commandLink value="Edit" action="#{users.editSetup}">
                                <f:param name="jsfcrud.currentUsers" value="#{jsfcrud_class['webidewar.jsf.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][item][users.converter].jsfcrud_invoke}"/>
                            </ice:commandLink>
                            <ice:outputText value=" "/>
                            <ice:commandLink value="Destroy" action="#{users.destroy}">
                                <f:param name="jsfcrud.currentUsers" value="#{jsfcrud_class['webidewar.jsf.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][item][users.converter].jsfcrud_invoke}"/>
                            </ice:commandLink>
                        </ice:column>
                    </ice:dataTable>
                </ice:panelGroup>
                <br />
                <ice:commandLink action="#{users.createSetup}" value="New Users"/>
                <br />
                <ice:commandLink value="Index" action="welcome" immediate="true" />

            </ice:form>
        </body>
    </html>
</f:view>
